#!/usr/bin/env perl

use strict;
use utf8;

my %last_name = qw(fred flintstone Wilma Flintstone Barney Rubble betty rubble Bamm-Bamm Rubble PEBBLES FLINTSTONE);

my @name = keys %last_name;

sub by_self_defined{
	"\L$last_name{$a}" cmp "\L$last_name{$b}" or
	"\L$a" cmp "\L$b";
}

my @sorted_name = sort by_self_defined @name;

foreach(@sorted_name){
	printf "%20s ========> %-20s\n", $_, $last_name{$_};
} 


